Here are all the custom attributes that we use plus all of the standard ones that Apple has already defined. The only thing that I do not know that we are doing right is whether the names entered in the registering of the attributes are correct. I am only documenting the custom attributes that Microspot have added although the source code contains all the Apple ones too.
struct THandleRecord
{
unsigned long theSize;
Handle theHandle;
};
All the following Microspot attributes are based around the THandleRecord structure. This basically holds a size or length followed by a handle to the data.
'snd ': Holds a handle to a sound which can be played with PlaySnd.
'PICT': Holds a handle to a QuickDraw picture which can be drawn with DrawPicture
'TEXT': Holds a handle to a block of text. Its length is found using GetHandleSize
'moov': Holds a handle to an alias to a movie
'desc': Holds a handle to a block of text that holds the description of an object
'LOCK': a 32 bit integer whose bits represent the objects locked or constrained state.
kObjectLockedBit = 1 // the object is completely locked and may not be modified in any way
kObjectConstrainPosXBit = 2 // position is not allowed to move in X
kObjectConstrainPosYBit = 3
kObjectConstrainPosZBit = 4
kObjectConstrainSizeXBit = 5 // size is not allowed to grow in X
kObjectConstrainSizeYBit = 6
kObjectConstrainSizeZBit = 7
kObjectConstrainRotateXBit = 8 // angle is not allowed to rotate in X
kObjectConstrainRotateYBit = 9
kObjectConstrainRotateZBit = 10
kObjectPrimitiveBit = 11 // an object or group is a primitive and may not be ungrouped.
// any suggestions for more bits??
Proposed new attributes but not implemented:
'alis': A THandleRecord which holds a handle to an alias.
'COST': A double which holds the price of an item in a standard currency (Dollar or Pound??)
The cost attribute may need more thinking about and maybe Apple has some good ideas as to how to add a price to an item. We will need this attribute when we want to have a report of the items in a design with a costing.